package transporte.server.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import transporte.server.dao.TestEntityDao;
import transporte.server.entity.TestEntity;

@Service
public class TransporteService {

	@Autowired
	TestEntityDao testEntityDao;
	
	@Transactional
	public TestEntity createTestEntity(String name) {
		TestEntity testEntity = new TestEntity();
    	testEntity.setName("test name");
    	
    	testEntityDao.save(testEntity);
    	
    	return testEntity;
	}
	
}
